package cn.yzfy.common.base.dto;

import cn.yzfy.common.validate.ValidateNotChinese;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;

import java.io.Serial;

/**
 * Long类型 id DTO基类
 */
@Getter public class BaseLongIdDTO extends BaseDTO {
  
  @Serial
  private static final long serialVersionUID = -1984062716902131708L;
  
  public BaseLongIdDTO() {
  }
  
  public BaseLongIdDTO(Long id) {
    this.id = id;
  }
  
  /**
   * id
   */
  @ValidateNotChinese.ValidateNotNullAndEmpty(message = "id 不能为空")
  @Schema(name = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1092327965422")
  private Long id;
  
  public void setId(Long id) {
    this.id = id;
  }
}